package Example15_17;

public class Example17 {
    public static void main(String[] args){
        Animal a1 = new Dog();
        System.out.println("动物类 a1 = new Dog() :“+(a1 instanceof Animal)");
        System.out.println("动物类 a1 = new Dog() :“+(a1 instanceof Dog)");
        Animal a2 = new Animal();
        System.out.println("动物类 a2 = new Animal() :“+(a2 instanceof Animal)");
        System.out.println("动物类 a2 = new Animal() :“+(a2 instanceof Dog)");
    }
}
